﻿USE [DefectManagementSystem];
SET NOCOUNT ON;
SET XACT_ABORT ON;
GO

SET IDENTITY_INSERT [dbo].[dms_DefectStatus] ON;
BEGIN TRANSACTION;
INSERT INTO [dbo].[dms_DefectStatus]([DefectStatus_Id], [StatusName])
SELECT 11, N'Accepted' UNION ALL
SELECT 7, N'Approved' UNION ALL
SELECT 2, N'Assigned' UNION ALL
SELECT 10, N'Cancelled' UNION ALL
SELECT 8, N'Closed' UNION ALL
SELECT 9, N'Confirmed' UNION ALL
SELECT 4, N'Corrected' UNION ALL
SELECT 5, N'Delivered' UNION ALL
SELECT 1, N'Error' UNION ALL
SELECT 3, N'Fixing' UNION ALL
SELECT 6, N'Validated'
COMMIT;
RAISERROR (N'[dbo].[dms_DefectStatus]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

SET IDENTITY_INSERT [dbo].[dms_DefectStatus] OFF;
SET IDENTITY_INSERT [dbo].[dms_DefectType] ON;
BEGIN TRANSACTION;
INSERT INTO [dbo].[dms_DefectType]([DefectType_Id], [TypeName])
SELECT 2, N'Business Logic' UNION ALL
SELECT 1, N'Coding Logic' UNION ALL
SELECT 3, N'Functionality (Other)'
COMMIT;
RAISERROR (N'[dbo].[dms_DefectType]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

SET IDENTITY_INSERT [dbo].[dms_DefectType] OFF;
SET IDENTITY_INSERT [dbo].[dms_Origin] ON;
BEGIN TRANSACTION;
INSERT INTO [dbo].[dms_Origin]([Origin_Id], [OriginName])
SELECT 1, N'Coding'
COMMIT;
RAISERROR (N'[dbo].[dms_Origin]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

SET IDENTITY_INSERT [dbo].[dms_Origin] OFF;
SET IDENTITY_INSERT [dbo].[dms_Priority] ON;
BEGIN TRANSACTION;
INSERT INTO [dbo].[dms_Priority]([Priority_Id], [PriorityName])
SELECT 3, N'High' UNION ALL
SELECT 1, N'Low' UNION ALL
SELECT 2, N'Medium'
COMMIT;
RAISERROR (N'[dbo].[dms_Priority]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

SET IDENTITY_INSERT [dbo].[dms_Priority] OFF;
SET IDENTITY_INSERT [dbo].[dms_QCActivity] ON;
BEGIN TRANSACTION;
INSERT INTO [dbo].[dms_QCActivity]([QCActivity_Id], [QCActivityName])
SELECT 4, N'After Release Review' UNION ALL
SELECT 3, N'After Release Test' UNION ALL
SELECT 2, N'Intergration Test' UNION ALL
SELECT 1, N'Unit Test'
COMMIT;
RAISERROR (N'[dbo].[dms_QCActivity]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

SET IDENTITY_INSERT [dbo].[dms_QCActivity] OFF;
SET IDENTITY_INSERT [dbo].[dms_Severity] ON;
BEGIN TRANSACTION;
INSERT INTO [dbo].[dms_Severity]([Severity_Id], [SeverityName])
SELECT 5, N'Cosmetic' UNION ALL
SELECT 3, N'High' UNION ALL
SELECT 1, N'Low' UNION ALL
SELECT 2, N'Medium' UNION ALL
SELECT 4, N'Serious'
COMMIT;
RAISERROR (N'[dbo].[dms_Severity]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

SET IDENTITY_INSERT [dbo].[dms_Severity] OFF;
SET IDENTITY_INSERT [dbo].[ProductType] ON;
BEGIN TRANSACTION;
INSERT INTO [dbo].[ProductType]([ProductType_Id], [TypeName])
SELECT 1, N'Database' UNION ALL
SELECT 2, N'Software Package'
COMMIT;
RAISERROR (N'[dbo].[ProductType]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

SET IDENTITY_INSERT [dbo].[ProductType] OFF;
SET IDENTITY_INSERT [dbo].[Roles] ON;
BEGIN TRANSACTION;
INSERT INTO [dbo].[Roles]([Role_Id], [RoleName])
SELECT 3, N'Developer' UNION ALL
SELECT 1, N'PM' UNION ALL
SELECT 2, N'Tester'
COMMIT;
RAISERROR (N'[dbo].[Roles]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

SET IDENTITY_INSERT [dbo].[Roles] OFF;
SET IDENTITY_INSERT [dbo].[Users] ON;
BEGIN TRANSACTION;
INSERT INTO [dbo].[Users]([User_Id], [UserName], [Password], [FullName], [Email], [Join_Date], [Role_Id])
SELECT 1, N'Leung', N'leung', N'Giang Vinh Luong', N'imjl7988@yahoo.com', '20100119 00:00:00.000', 1 UNION ALL
SELECT 2, N'LeungTester', N'leung', N'Giang Vinh Luong', N'imjl7988@live.com', '20100119 00:00:00.000', 2 UNION ALL
SELECT 3, N'LeungDeveloper', N'leung', N'Giang Vinh Luong', N'imjl7988@gmail.com', '20100119 00:00:00.000', 3
COMMIT;
RAISERROR (N'[dbo].[Users]: Insert Batch: 1.....Done!', 10, 1) WITH NOWAIT;
GO

SET IDENTITY_INSERT [dbo].[Users] OFF;
